package cn.bdqn.repository;

import cn.bdqn.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface UserRepository extends JpaRepository<User,Long>, JpaSpecificationExecutor<User> {
//    @Query(" FROM User WHERE usrName = :userName")
//    @Query(value="SELECT * FROM `springboot`.`sys_user` WHERE `usr_name` = :userName",nativeQuery=true)
//    public List<User> selectName(@Param("userName") String usrName);

    public List<User> findByUsrNameLike(String userName);
    public List<User> findByUsrNameAndUsrPassword(String userName,String password);
}
